package com.amigo.online.provider.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.amigo.online.common.base.service.BaseService;
import com.amigo.online.provider.manager.mapper.GlobalConfigMapper;
import com.amigo.online.provider.manager.model.entity.GlobalConfig;
import com.amigo.online.provider.manager.service.GlobalConfigService;

@Service
public class GlobalConfigServiceImpl extends BaseService<GlobalConfig> implements GlobalConfigService {
    @Resource
    private GlobalConfigMapper globalConfigMapper;

    @Override
    public List<GlobalConfig> select(GlobalConfig globalConfig) {
        return globalConfigMapper.findGlobalConfigList(globalConfig);
    }

    @Override
    public int save(GlobalConfig globalConfig) {
        globalConfig.setUpdatedTime(globalConfig.getCreatedTime());

        return globalConfigMapper.insertGlobalConfig(globalConfig);
    }

    @Override
    public int update(GlobalConfig globalConfig) {
        return globalConfigMapper.updateGlobalConfig(globalConfig);
    }

    @Override
    public int delete(GlobalConfig globalConfig) {
        return globalConfigMapper.deleteGlobalConfig(globalConfig);
    }


}
